<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Accordion</title>
  <style>
    div{
      border:1px solid #000;
      display: none;
    }
    h3{
      cursor: pointer;
    }
  </style>
</head>
<body>
<h3>唐僧</h3>
<div>我是师傅！！！</div>
<h3>孙悟空</h3>
<div>我是大师兄</div>
<h3>猪八戒</h3>
<div>我是二师兄</div>
<h3>沙师弟</h3>
<div>我是师弟</div>
<script src="js/jquery-3.1.1.js"></script>
<script>
  $("body").on("click","h3",function (e) {
    var target=e.target;
    $(target).next().slideToggle();
  })
</script>
</body>
</html>